import request from '@/utils/request'

// request({
//   method: 'xxx',
//   url: 'xxx',
//   ...
// })

/**
 *轮播图数据
 */
export const getBanner = () => {
    return request({
        method: 'post',
        url: '/api/index/banner'
    })
}

//导航栏数据
export const getNav = () => {
    return request({
        method: 'post',
        url: '/api/index/menu'
    })
}

//首页信息

export const getCompany = () => {
    return request({
        method: 'post',
        url: '/api/index/company'
    })
}


//首页中部
export const getCompanyMsg = () => {
    return request({
        method: 'post',
        url: '/api/index/middle'
    })
}

//总体战略
export const getStrategy = (data) => {
    return request({
        method: 'post',
        url: '/api/index/strategy',
        data
    })
}

// 核心业务
export const getBusiness = () => {
    return request({
        method: 'post',
        url: '/api/index/business'
    })
}

// 服务体系  
export const getSystems = () => {
    return request({
        method: 'post',
        url: '/api/index/systems'
    })
}

// 客户群体
export const getCustomer = () => {
    return request({
        method: 'post',
        url: '/api/index/customer'
    })
}


//公司新闻
export const getInformation = (data) => {
        return request({
            method: 'post',
            url: '/api/index/information',
            data
        })
    }
    //公司文化 /api/index/culture
export const getCulture = () => {
    return request({
        method: 'post',
        url: '/api/index/culture'
    })
}



//公司领导  业务团队  城市事业部
export const getTeam = (data) => {
    return request({
        method: 'post',
        url: '/api/index/team',
        data
    })
}


// 业务与服务

export const getService = () => {
    return request({
        method: 'post',
        url: '/api/index/service'
    })
}

// 登录  

export const getMobilelogin = (data) => {
    return request({
        method: 'post',
        url: '/api/member/mobilelogin',
        data
    })
}

//个人认证 /api/member/personal

export const getPersonal = (data) => {
    return request({
        method: 'post',
        url: '/api/member/personal',
        data
    })
}

//企业认证 /api/member/company

export const getCompanyQi = (data) => {
        return request({
            method: 'post',
            url: '/api/member/company',
            data
        })
    }
    //咨询师分类 /api/member/consgroup

export const getConsgroup = (data) => {
    return request({
        method: 'post',
        url: '/api/member/consgroup',
        data
    })
}

//咨询师认证 /api/member/consultant

export const getConsultant = (data) => {
        return request({
            method: 'post',
            url: '/api/member/consultant',
            data
        })
    }
    // 咨询师详情 /api/member/consinfo id(用户id)
export const getConsinfo = (data) => {
    return request({
        method: 'post',
        url: '/api/member/consinfo',
        data
    })
}


// 咨询师列表  /api/member/lists  
// group_id 分类id， 非必传
// page分页， 默认为1

export const getLists = (data) => {
    return request({
        method: 'post',
        url: '/api/member/lists',
        data
    })
}


// 咨询师详情 /api/member/userinfo id（ 用户id）


export const getUserinfo = (data) => {
    return request({
        method: 'post',
        url: '/api/member/consinfo',
        data
    })
}


//荣誉咨询 /api/index/honer

export const getHoner = () => {
    return request({
        method: 'post',
        url: '/api/index/honer'
    })
}

//就业与服务/index/index/getData
export const getData = (data) => {
    return request({
        method: 'post',
        url: '/api//index/getData',
        data
    })
}



/**
 * uploadFile  文件上传接口
 * @param {String} url [请求的url地址]
 * @param {Object} params [请求时携带的参数]
 */

export const uploadFile = (data) => {
    return request({
        method: 'post',
        url: '/api/member/upfile',
        headers: {
            "Content-Type": "multipart/form-data"
        },
        data
    })
}

// export function uploadFile(params) {
//     return new Promise((resolve, reject) => {
//         axios.post('/api/member/upfile', params, {
//             headers: {
//                 "Content-Type": "multipart/form-data"
//             },
//         }).then(res => {
//             resolve(res.data);
//         }).catch(err => {
//             reject(err);
//         })
//     });
// }